import requests
import app
class Bumen:
    def __init__(self):
        self.insert_url=app.base_url+ "/api/company/department"
        self.other_url=app.base_url+ '/api/company/department/{}'
    def insert_(self,bumen_data,TOKEN):
        return requests.post(self.insert_url,json=bumen_data,headers={"Authorization":TOKEN})
    def updata_(self,bumen_id,updata_data,TOKEN):
        return requests.put(self.other_url.format(bumen_id),json=updata_data,headers={"Authorization":TOKEN})
    def delect_(self,bumen_id,TOKEN):
        return requests.delete(self.other_url.format(bumen_id),headers={"Authorization":TOKEN})
